USE [AESDB]
GO

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_JobApplications_Rejected]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[JobApplications] DROP CONSTRAINT [DF_JobApplications_Rejected]
END

GO

USE [AESDB]
GO

/****** Object:  Table [dbo].[JobApplications]    Script Date: 06/06/2013 16:33:48 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[JobApplications]') AND type in (N'U'))
DROP TABLE [dbo].[JobApplications]
GO

USE [AESDB]
GO

/****** Object:  Table [dbo].[JobApplications]    Script Date: 06/06/2013 16:33:48 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[JobApplications](
	[JobApplicationID] [int] IDENTITY(1,1) NOT NULL,
	[ApplyDate] [datetime] NOT NULL,
	[UserID] [int] NOT NULL,
	[JobID] [int] NOT NULL,
	[Reviewed] [bit] NOT NULL,
	[Accepted] [bit] NOT NULL,
	[Hired] [bit] NOT NULL,
	[Rejected] [bit] NOT NULL,
 CONSTRAINT [PK_JobApplications] PRIMARY KEY CLUSTERED 
(
	[JobApplicationID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[JobApplications] ADD  CONSTRAINT [DF_JobApplications_Rejected]  DEFAULT ((0)) FOR [Rejected]
GO

